package com.goudan.demo.schedule;

import com.goudan.demo.schedule.common.BaseBatch;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.executor.XxlJobExecutor;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class BatchDemo extends BaseBatch<String> {

    @PostConstruct
    public void init() {
        XxlJobExecutor.registJobHandler("batchDemo", this);
    }



    public static void main(String[] args) {
        System.out.println("我的调度BaseBatch!!!!!!!");
        XxlJobHelper.log("XXL-JOB,苟蛋的通用调度： Hello World.");
        String param = XxlJobHelper.getJobParam();
        System.out.println("我的调度xxl——job：hello world!!!!!!!开始了，开心..........参数：" + param);
        System.out.println("我的调度BaseBatch hello...............");

    }

}
